<div class="contener body_panel search_panel">
    <div class="left_panel">
        <h2>Your search has produced <span>(<?php echo count($list); ?>) available <?php echo $type; ?></span></h2>


        <?php $index=0; $rightClass = ''; ?>
        <?php foreach($list as $player): ?>
            <?php
                $index = $index + 1;
                if($index % 4 == 0) {
                    $rightClass = 'noright_mar';
                } else {
                    $rightClass = '';
                }
            ?>
            <div class="players_panel <?php echo $rightClass;?>"">
                <div class="info">
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/players/264.186/<?php echo $player->person->image;?>" width="264" height="186" alt="pic" class="player"/>

                    <h3><?php echo $player->person->fullName;?></h3>
                    <ul>
                        <li><strong>Citizenship</strong> <span><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/flags/<?php echo $player->person->citizenship->code;?>.png"
                                                                    width="20" height="14" alt="flag"/> <?php echo $player->person->citizenship->name;?></span></li>
                        <li><strong>Position</strong> <span><?php echo $player->position;?></span></li>
                        <li><strong>Hand</strong> <span><?php echo $player->hand;?></span></li>
                        <li><strong>Current residence</strong> <span><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/flags/<?php echo $player->person->residence->code;?>.png"
                                                                          width="20" height="14" alt="flag"/> <?php echo $player->person->residence->name;?></span></li>
                    </ul>
                    <a href="index.php?r=site/details&id=<?php echo $player->id;?>" class="read_more">Go to the Profile &raquo;</a>
                </div>
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/players-info-bg-short.jpg" width="201" height="11" alt="pic"/>
            </div>
        <?php endforeach; ?>

        <?php $this->widget('CLinkPager', array('header' => '', 'prevPageLabel' => '<', 'nextPageLabel' => '>', 'pages' => $pages)); ?>
    </div>
    <div class="right_panel">&nbsp;</div>
</div>